package com.diankangwo.factory.service.impl;

import com.diankangwo.factory.dao.TdMinMoneyLimitMapper;
import com.diankangwo.factory.entity.TdMinMoneyLimit;
import com.diankangwo.factory.service.TdMinMoneyLimitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/** 最低提现金额接口实现类
 * Created by wuye on 2017/10/16.
 */
@Service("TdMinMoneyLimitService")
public class TdMinMoneyLimitServiceImpl implements TdMinMoneyLimitService {

    @Autowired
    private TdMinMoneyLimitMapper mapper;

    /**
     * 添加
     */
    @Override
    @Transactional
    public void save(TdMinMoneyLimit tdMinMoneyLimit){
        mapper.insert(tdMinMoneyLimit);
    }

    /**
     * 根据ID查询
     */
    @Override
    public TdMinMoneyLimit findById(int id){
        return mapper.selectByPrimaryKey(id);
    }


    /**
     * 修改
     */
    @Override
    @Transactional
    public int update(TdMinMoneyLimit tdMinMoneyLimit){
        return mapper.updateByPrimaryKey(tdMinMoneyLimit);
    }
}
